﻿using System.Security.Claims;
using System.Xml.Linq;

namespace Demo.Net.JWT
{



    public static class JwtUtils
    {
        public static string GetUserId(this ClaimsPrincipal claimsPrincipal)
        {
             return claimsPrincipal.FindFirst(ClaimTypes.NameIdentifier)?.Value;
   
        }


        public static string GetUserValue(this ClaimsPrincipal claimsPrincipal, string type)
        {
            return claimsPrincipal.FindFirst(type)?.Value;
        }



    }

}
